package com.tianyang.yukuaifuzs.business.main.presenter;

import com.tianyang.yukuaifuzs.business.main.contract.HomePageContract;

import rx.subscriptions.CompositeSubscription;

/**
 * Description：首页
 */

public class HomePagePresenter implements HomePageContract.Presenter {

    private HomePageContract.View mView;

    private CompositeSubscription mSubscription;

    public HomePagePresenter(HomePageContract.View mView) {
        this.mView = mView;
        mSubscription = new CompositeSubscription();
    }

    @Override
    public void onDestroyPresenter() {
        if (mSubscription != null && !mSubscription.isUnsubscribed()) {
            mSubscription.unsubscribe();
            mSubscription = null;
        }
        if (mView != null) {
            mView = null;
        }
    }
}
